import { Injectable } from '@nestjs/common'
import { Model } from 'mongoose'
import { InjectModel } from '@nestjs/mongoose'
import { WxUser, UserDocument } from '@libs/db/schemas/user.schema'
import { RegUser } from './dto'
@Injectable()
export class UserService {
  constructor(@InjectModel(WxUser.name) private UserModel: Model<UserDocument>) {}

  async regUser(user: RegUser): Promise<WxUser> {
    return await this.UserModel.create(user)
  }
}
